package com.ruoyi.stock.service.impl;

import com.ruoyi.stock.domain.WarehouseOutInfo;
import com.ruoyi.stock.mapper.WarehouseOutInfoMapper;
import com.ruoyi.stock.service.IWarehouseOutInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 出库清单Service业务层处理
 *
 * @author YwaiX
 * @date 2024-10-29
 */
@Service
public class WarehouseOutInfoServiceImpl implements IWarehouseOutInfoService {
    @Autowired
    private WarehouseOutInfoMapper warehouseOutInfoMapper;

    /**
     * 查询出库清单
     *
     * @param id 出库清单主键
     * @return 出库清单
     */
    @Override
    public WarehouseOutInfo selectWarehouseOutInfoById(Long id) {
        return warehouseOutInfoMapper.selectWarehouseOutInfoById(id);
    }

    /**
     * 查询出库清单列表
     *
     * @param warehouseOutId 出库清单
     * @return 出库清单
     */
    @Override
    public List<WarehouseOutInfo> selectWarehouseOutInfo(Integer warehouseOutId) {
        return warehouseOutInfoMapper.selectWarehouseOutInfo(warehouseOutId);
    }

    @Override
    public List<WarehouseOutInfo> selectWarehouseOutInfoList(WarehouseOutInfo warehouseOutInfo) {
        return warehouseOutInfoMapper.selectWarehouseOutInfoList(warehouseOutInfo);
    }

    /**
     * 新增出库清单
     *
     * @param warehouseOutInfo 出库清单
     * @return 结果
     */
    @Override
    public int insertWarehouseOutInfo(WarehouseOutInfo warehouseOutInfo) {
        return warehouseOutInfoMapper.insertWarehouseOutInfo(warehouseOutInfo);
    }

    /**
     * 修改出库清单
     *
     * @param warehouseOutInfo 出库清单
     * @return 结果
     */
    @Override
    public int updateWarehouseOutInfo(WarehouseOutInfo warehouseOutInfo) {
        return warehouseOutInfoMapper.updateWarehouseOutInfo(warehouseOutInfo);
    }

    /**
     * 批量删除出库清单
     *
     * @param ids 需要删除的出库清单主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseOutInfoByIds(Long[] ids) {
        return warehouseOutInfoMapper.deleteWarehouseOutInfoByIds(ids);
    }

    /**
     * 删除出库清单信息
     *
     * @param id 出库清单主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseOutInfoById(Long id) {
        return warehouseOutInfoMapper.deleteWarehouseOutInfoById(id);
    }
}
